package cn.tedu._03vehicle.base.config;

import cn.tedu._03vehicle.base.listener.ApoListener;
import cn.tedu._03vehicle.base.servlet.DataServlet;
import org.springframework.boot.web.servlet.ServletListenerRegistrationBean;
import org.springframework.boot.web.servlet.ServletRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class SpringWebConfig {
    @Bean
    public ServletListenerRegistrationBean servletListenerRegistrationBean() {
        return new ServletListenerRegistrationBean(new ApoListener());
    }
    @Bean
    public ServletRegistrationBean servletRegistrationBean() {

        return new ServletRegistrationBean(new DataServlet(), "/data");
    }
}
